package flymoke.reflect;

public class ReflectDemon3 {
	public static void main(String[] args) {
		Class<?> cla = null;
		try {
			cla = Class.forName("flymoke.reflect.Person");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		Person person = null;
		try {
			person = (Person) cla.newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		person.setId(10);
		person.setName("jack");
		System.out.println(person);
	}
}
